-
Notifications
You must be signed in to change notification settings - Fork 303
[QIR] Insert array record call in sampling workflow #3553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
inset an array recording output call pripr to any record result calls. This pass should be used in `sample` workflow. Signed-off-by: Pradnya Khalate <[email protected]>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
|
|
||
| LLVM_DEBUG(llvm::dbgs() << "Before adding array recording call:\n" | ||
| << *funcOp); | ||
| if (failed(insertArrayRecordingCalls(funcOp, analysis.arraySize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use the intrinsic loading instead of rolling your own. Aren't these already loaded by the QIR API Prep pass, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to make this pass self-contained, since we cannot guarantee that the prep pass has run before this one.
Should I move the loadIntrinsic call from line#176 here?
Signed-off-by: Pradnya Khalate <[email protected]>
ff1bb2a to
c774568
Compare
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Update label to be of type `i1` instead of `i8` since we interpret the results as Booleans. * Test for parser. Signed-off-by: Pradnya Khalate <[email protected]>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Pradnya Khalate <[email protected]>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
This PR introduces a new module pass,
QirInsertArrayRecord, that analyzes instruction patterns and inserts array recording instruction required for proper measurement result handling in QIR pipelines. The pass identifies measurement storage patterns and ensures the QIR output declares the correct array size and type label for measurement results.This PR also enables the pass in compilation workflow.